{layout name="layout" /}
<div class="row">
    <div class="col-xs-12">
        <div class="nav-tabs-custom">
            <div class="box">
                <div class="box-header">
                    <h3 class="box-title">内容列表</h3>
                </div>
                <!-- /.box-header -->
                <form action="{:url('listorder')}" class="ingeAjax" method="POST">
                    <div class="box-body">
                        <div class="table-responsive">
                            <button class="btn btn-primary pxbtn" type="submit">排序</button>
                            <br/>
                            <table id="staff" class="table table-bordered table-striped">
                                <thead>
                                    <tr>
                                        <th>排序</th>
                                        <th>ID</th>
                                        <th>文章标题</th>
                                        <th>所属栏目</th>
                                        <th>文章属性</th>
                                        <th>状态</th>
                                        <th>发布时间</th>
                                        <th>显示时间</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    {volist name="list" id="vo"}
                                    <tr>
                                        <td class='pxinput'>
                                            <input type='hidden' name='id[]' value='{$vo.new_id}'>
                                            <input type='text' name='order[]' value='{$vo.listorder}' class='pxinput'>
                                        </td>
                                        <td>{$vo.new_id}</td>
                                        <td>{$vo.new_title}</td>
                                        <td>{:get_terminfo_by_newid($vo['new_id'],'name')}</td>
                                        <td>
                                            {php}
                                            $new_flag = json_decode($vo['new_flag'],true);
                                            if(is_array($new_flag)){
                                                foreach($new_flag as $v){
                                                        switch ($v) {
                                                            case 'h':
                                                                echo '<span style="color:#FFFFFF">头</span>';
                                                                break;
                                                            case 'c':
                                                                echo '<span style="color:#0000FF">荐</span>';
                                                                break;
                                                            case 'f':
                                                                echo '<span style="color:#00FF00">幻</span>';
                                                                break;
                                                            case 'a':
                                                                echo '<span style="color:#FF0000">置</span>';
                                                                break;
                                                            case 's':
                                                                echo '<span style="color:#FF00FF">滚</span>';
                                                                break;
                                                            case 'p':
                                                                echo '<span style="color:#00FFFF">图</span>';
                                                                break;
                                                            case 'j':
                                                                echo '<span style="color:#FFFF00">跳</span>';
                                                                break;
                                                            case 'd':
                                                                echo '<span style="color:#70DB93">原</span>';
                                                                break;
                                                        }
                                                }      
                                            }    
                                            {/php}
                                        </td>
                                        <td>
                                        {if condition="$vo['new_status']=='1'"}
                                        <span class="label label-success status" data-href="{:url('change_status','id='.$vo['new_id'])}" data-status="1" data-id="{$vo.new_id}">已审</span>
                                        {else /}
                                        <span class="label label-danger status" data-href="{:url('change_status','id='.$vo['new_id'])}" data-status="0" data-id="{$vo.new_id}">未审</span>
                                        {/if}
                                        </td>
                                        <td>{$vo.new_time}</td>
                                        <td>{$vo.new_showtime}</td>
                                        <td><a href="{:url('edit', 'id='.$vo['new_id'])}"><i class="fa fa-pencil control"></i></a>&nbsp;<i class="fa fa-trash-o red control confirm-rst-url-btn" data-url="<?php echo url('del','id='.$vo['new_id']);?>" data-info="您确定要删除当前用户吗？" title="删除"></i></td>
                                    </tr>
                                    {/volist}
                                </tbody>
                                <!-- tbody是必须的 -->
                            </table>
                            {$list->render()}
                            <br/>
                            <button class="btn btn-primary pxbtn" type="submit">排序</button>
                        </div>
                    </div>
                </form>
                <!-- /.box-body -->
            </div>
            <!-- /.box -->
        </div>
        <!-- /.col -->
    </div>
</div>
<!-- /.row -->
</section>
<!-- /.content -->
{include file="public/base" /} {include file="public/edit" /} {include file="public/footer" /}
</body>

</html>
